﻿@using JQueryUIHelpers
@model CS795.TravelAgency.Models.CarRentalRequestViewModel

@Scripts.Render("~/bundles/jqueryui")

@using (Ajax.BeginForm("RequestCarRentalQuote", "Trip", new { tripId = ViewBag.TripId }, new AjaxOptions { UpdateTargetId = "car-rental-data", LoadingElementId = "loading", OnSuccess = "CarRentalSuccess" }, new { id="request-quote-car-form", @class = "form-horizontal" }))
{ 
    @Html.AntiForgeryToken()
    @Html.ValidationSummary("", new { @class = "text-danger" })
    <div class="form-group">
        @Html.LabelFor(m => m.CarType, new { @class = "col-md-3 control-label" })
        <div class="col-md-6">
            @Html.DropDownListFor(m => m.CarType, new SelectList(@ViewBag.CarTypes))
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(m => m.StartDate, new { @class = "col-md-3 control-label" })
        <div class="col-md-6">
            @Html.JQueryUI().DatepickerFor(m => m.StartDate)
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(m => m.EndDate, new { @class = "col-md-3 control-label" })
        <div class="col-md-6">
            @Html.JQueryUI().DatepickerFor(m => m.EndDate)
        </div>
    </div>
}